import request from "../utils/request.js";

export function checkFile(data) {
  return request({
    method: "POST",
    url: "/file/checkFile",
    data
  })
}

export function upload(data) {
  return request({
    method: "POST",
    url: "/file/upload",
    data
  })
}

export function deleteById(fileId) {
  return request({
    method: "POST",
    url: "/file/deleteById",
    params: {
      fileId,
    }
  })
}

export function download(saveFileName) {
  return request({
    method: "get",
    url: "/file/download",
    params: {
      saveFileName,
    }
  })
}

export function getDownloadUrl(saveFileName) {
  return request.getUri({
    url: "/file/download",
    params: {
      saveFileName,
    }
  })
}
